﻿using System;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.IO;
using System.Collections.ObjectModel;

namespace uploadTest1
{
    public partial class uploader : ChildWindow
    {
        public Collection<string> GUIDNames = new Collection<string>();
        public Collection<FileInfo> filesSent = new Collection<FileInfo>();

        public uploader()
        {            
            InitializeComponent();
            uploadControl.FileSizeLimit = 80000000000;
            uploadControl.AllFilesUploaded += new MFUpload.AllFilesUploadedHandler(uploadControl_AllFilesUploaded);
        }

        void uploadControl_AllFilesUploaded(object sender, MFUpload.FilesSentEventArgs e)
        {
            foreach (string name in uploadControl.GuidNames)
            {
                GUIDNames.Add(name);
            }
            foreach (FileInfo f in uploadControl.uploadedFileList)
            {
                filesSent.Add(f);
            }

        }

        

        
        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }

        
    }
}

